
package visit;

public class Visitor {

    public void visit(NewsNotifaction visitable) {
        visitable.openNewsAndShowDetail();
        setReaded();
    }

    private void setReaded() {
        System.out.println("设置新闻已读");
    }

    public void visit(NewsList visitable) {
        visitable.openNewsDetail();
        setReaded();

    }
}
